#include<func.h>
void* threadfunc(void* p)
{
    time_t now;
    time(&now);
    char *q=ctime(&now);
    printf("child thread  p=%p,ctime=%s",q,q);
    sleep(3);
    printf("child thread second  p=%p,ctime=%s",q,q);
    pthread_exit(NULL);
}
int main()
{
    pthread_t pthid;
    pthread_create(&pthid,NULL,threadfunc,NULL);
    sleep(1);
    time_t now;
    time(&now);
    char *p=ctime(&now);
    printf("main thread p=%p,ctime=%s",p,p);
    pthread_join(pthid,NULL);
    return 0;

}